Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

Using Sequence Grabber Components

You can use the sequence grabber component to play captured data for the user or to save captured data in a QuickTime movie. The sequence grabber component provides functions that give your application precise control over the display of the captured data.

This section describes how to use the basic sequence grabber component functions as well as the functions that allow you to configure video and sound channels.

Sequence grabber components are standard components that are managed by the Component Manager. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for more information about the Component Manager and about how to use components.

Apple has defined a component type value for sequence grabber components--that type value is 'barg' . You can use the following constant to specify this type value.

#define SeqGrabComponentType 'barg'             /* sequence grabber
                                                    component type */

Apple has defined a functional interface for basic sequence grabber components. For information about the functions a sequence grabber component may support, see "Sequence Grabber Component Functions," which begins on Sequence Grabber Component Functions .

You can use the following constants to refer to the request codes for each of the functions that a sequence grabber component may support.

enum {
    /* selectors for basic sequence grabber component functions */
    kSGInitializeSelect                         = 0x1;      /* SGInitialize */
    kSGSetDataOutputSelect                      = 0x2;      /* SGSetDataOutput */
    kSGGetDataOutputSelect                      = 0x3;      /* SGGetDataOutput */
    kSGSetGWorldSelect                          = 0x4;      /* SGSetGWorld */
    kSGGetGWorldSelect                          = 0x5;      /* SGGetGWorld */       
    kSGNewChannelSelect                         = 0x6;      /* SGNewChannel */
    kSGDisposeChannelSelect                     = 0x7;      /* SGDisposeChannel */
    kSGStartPreviewSelect                       = 0x10;     /* SGStartPreview */
    kSGStartRecordSelect                        = 0x11;     /* SGStartRecord */
    kSGIdleSelect                               = 0x12;     /* SGIdle */
    kSGStopSelect                               = 0x13;     /* SGStop */
    kSGPauseSelect                              = 0x14;     /* SGPause */
    kSGPrepareSelect                            = 0x15;     /* SGPrepare */
    kSGReleaseSelect                            = 0x16;     /* SGRelease */
    kSGGetMovieSelect                           = 0x17;     /* SGGetMovie */
    kSGSetMaximumRecordTimeSelect               = 0x18;     /* SGSetMaximumRecordTime */
    kSGGetMaximumRecordTimeSelect               = 0x19;     /* SGGetMaximumRecordTime */
    kSGGetStorageSpaceRemainingSelect           = 0x1a;     /* SGGetStorageSpaceRemaining */
    kSGGetTimeRemainingSelect                   = 0x1b;     /* SGGetTimeRemaining */            
    kSGGrabPictSelect                           = 0x1c;     /* SGGrabPict */
    kSGGetLastMovieResIDSelect                  = 0x1d;     /* SGGetLastMovieResID */
    kSGSetFlagsSelect                           = 0x1e;     /* SGSetFlags */
    kSGGetFlagsSelect                           = 0x1f;     /* SGGetFlags */
    kSGSetDataProcSelect                        = 0x20;     /* SGSetDataProc */
    kSGNewChannelFromComponentSelect = 0x21;                /* SGNewChannelFromComponent */
    kSGDisposeDeviceListSelect                  = 0x22;     /* SGDisposeDeviceList */
    kSGAppendDeviceListToMenuSelect             = 0x23;     /* SGAppendDeviceListToMenu */
    kSGSetSettingsSelect                        = 0x24;     /* SGSetSettings */
    kSGGetSettingsSelect                        = 0x25;     /* SGGetSettings */
    kSGGetIndChannelSelect                      = 0x26;     /* SGGetIndChannel */
    kSGUpdateSelect                             = 0x27;     /* SGUpdate */
    kSGGetPauseSelect                           = 0x28;     /* SGGetPause */
    kSGSettingsDialogSelect                     = 0x29;     /* SGSettingsDialog */
    kSGGetAlignmentProcSelect                   = 0x2A;     /* SGGetAlignmentProc */
    kSGSetChannelSettingsSelect                 = 0x2B;     /* SGSetChannelSettings */
    kSGGetChannelSettingsSelect                 = 0x2C;     /* SGGetChannelSettings */
    /* selectors for common channel configuration functions */
    kSGCSetChannelUsageSelect                   = 0x80;     /* SGCSetChannelUsage */
    kSGCGetChannelUsageSelect                   = 0x81;     /* SGCGetChannelUsage */
    kSGCSetChannelBoundsSelect                  = 0x82;     /* SGCSetChannelBounds */
    kSGCGetChannelBoundsSelect                  = 0x83;     /* SGCGetChannelBounds */
    kSGCSetChannelVolumeSelect                  = 0x84;     /* SGCSetChannelVolume */
    kSGCGetChannelVolumeSelect                  = 0x85;     /* SGCGetChannelVolume */
    kSGCGetChannelInfoSelect                    = 0x86;     /* SGCGetChannelInfo */
    kSGCSetChannelPlayFlagsSelect               = 0x87;     /* SGCSetChannelPlayFlags */            
    kSGCGetChannelPlayFlagsSelect               = 0x88;     /* SGCGetChannelPlayFlags */
    kSGCSetChannelMaxFramesSelect               = 0x89;     /* SGCSetChannelMaxFrames */
    kSGCGetChannelMaxFramesSelect               = 0x8a;     /* SGCGetChannelMaxFrames */
    kSGCSetChannelRefConSelect                  = 0x8b;     /* SGCSetChannelRefCon */
    kSGCSetChannelClipSelect                    = 0x8C;     /* SGCSetChannelClip */
    kSGCGetChannelClipSelect                    = 0x8D;     /* SGCGetChannelClip */
    kSGCGetChannelSampleDescriptionSelect = 0x8E;
                                                    /* SGCGetChannelSampleDescription */
    kSGCGetChannelDeviceListSelect              = 0x8F;     /* SGCGetChannelDeviceList */
    kSGCSetChannelDeviceSelect                  = 0x90;     /* SGCSetChannelDevice */
    kSGCSetChannelMatrixSelect                  = 0x91;     /* SGCSetChannelMatrix */
    kSGCGetChannelMatrixSelect                  = 0x92;     /* SGCGetChannelMatrix */
    kSGCGetChannelTimeScaleSelect               = 0x93;     /* SGCGetChannelTimeScale */
    /* selectors for video channel configuration functions */
    kSGCGetSrcVideoBoundsSelect                 = 0x100;    /* SGCGetSrcVideoBounds */
    kSGCSetVideoRectSelect                      = 0x101;    /* SGCSetVideoRect */
    kSGCGetVideoRectSelect                      = 0x102;    /* SGCGetVideoRect */
    kSGCGetVideoCompressorTypeSelect        = 0x103;        /* SGCGetVideoCompressorType */
    kSGCSetVideoCompressorTypeSelect            = 0x104;    /* SGCSetVideoCompressorType */
    kSGCSetVideoCompressorSelect                = 0x105;    /* SGCSetVideoCompressor */
    kSGCGetVideoCompressorSelect                = 0x106;    /* SGCGetVideoCompressor */
    kSGCGetVideoDigitizerComponentSelect
                                                = 0x107;
                                                        /* SGCGetVideoDigitizerComponent */
    kSGCSetVideoDigitizerComponentSelect
                                                = 0x108;
                                                        /* SGCSetVideoDigitizerComponent */
    kSGCVideoDigitizerChangedSelect             = 0x109; /* SGCVideoDigitizerChanged */
    kSGCSetVideoBottlenecksSelect               = 0x10a;    /* SGCSetVideoBottlenecks */
    kSGCGetVideoBottlenecksSelect               = 0x10b; /* SGCGetVideoBottlenecks */
    kSGCGrabFrameSelect                         = 0x10c;    /* SGCGrabFrame */
    kSGCGrabFrameCompleteSelect                 = 0x10d;    /* SGCGrabFrameComplete */
    kSGCDisplayFrameSelect                      = 0x10e;    /* SGCDisplayFrame */
    kSGCCompressFrameSelect                     = 0x10f;    /* SGCCompressFrame */
    kSGCCompressFrameCompleteSelect             = 0x110;    /* SGCCompressFrameComplete */
    kSGCAddFrameSelect                          = 0x111;    /* SGCAddFrameSelect */
    kSGCTransferFrameForCompressSelect = 0x112;
                                                        /* SGCTransferFrameForCompress */
    kSGCSetCompressBufferSelect                 = 0x113;    /* SGCSetCompressBuffer */
    kSGCGetCompressBufferSelect                 = 0x114;    /* SGCGetCompressBuffer */
    kSGCGetBufferInfoSelect                     = 0x115; /* SGCGetBufferInfo */
    kSGCSetUseScreenBufferSelect                = 0x116; /* SGCSetUseScreenBuffer */
    kSGCGetUseScreenBufferSelect                = 0x117; /* SGCGetUseScreenBuffer */
    kSGCGrabCompressCompleteSelect              = 0x118; /* SGCGrabCompressComplete */
    kSGCDisplayCompressSelect                   = 0x119; /* SGCDisplayCompress */
    kSGCSetFrameRateSelect                      = 0x11A; /* SGCSetFrameRate */
    kSGCGetFrameRateSelect                      = 0x11B; /* SGCGetFrameRate */
    /* selectors for sound channel configuration functions */
    kSGCSetSoundInputDriverSelect                = 0x100;   /* SGCSetSoundInputDriver */
    kSGCGetSoundInputDriverSelect                = 0x101;   /* SGCGetSoundInputDriver */
    kSGCSoundInputDriverChangedSelect           = 0x102;    
                                                    /* SGCSoundInputDriverChanged */
    kSGCSetSoundRecordChunkSizeSelect           = 0x103;    
                                                    /* SGCSetSoundRecordChunkSize */
    kSGCGetSoundRecordChunkSizeSelect           = 0x104;
                                                    /* SGCGetSoundRecordChunkSize */
    kSGCSetSoundInputRateSelect                  = 0x105; /* SGCSetSoundInputRate */
    kSGCGetSoundInputRateSelect                  = 0x106; /* SGCGetSoundInputRate */
    kSGCSetSoundInputParametersSelect           = 0x107;
                                                    /* SGCSetSoundInputParameters */
    kSGCGetSoundInputParametersSelect           = 0x108;
                                                    /* SGCGetSoundInputParameters */
    /* selectors for utility functions provided to channel components */
    kSGWriteMovieData                           = 0x100; /* SGWriteMovieData */
    kSGAddFrameReferenceSelect                  = 0x101; /* SGAddFrameReference */
    kSGGetNextFrameReferenceSelect              = 0x102; /* SGGetNextFrameReference */
    kSGGetTimeBaseSelect                        = 0x103; /* SGGetTimeBase */
    kSGSortDeviceListSelect                     = 0x104; /* SGSortDeviceList */
    kSGAddMovieDataSelect                       = 0x105; /* SGAddMovieData */
    kSGChangedSourceSelect                      = 0x106; /* SGChangedSource */
};

Previewing and Recording Captured Data

Playing Captured Data and Saving It in a QuickTime Movie


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next